package com.key.w8.http1.factory;

/**
 * @Author: k8
 * @CreateTime: 2025-04-27
 * @Version: 1.0
 */
public enum HttpMethod {
    GET, HEAD, POST, PUT ,PATCH , DELETE, TRACE ,CONNECT;
    public static io.netty.handler.codec.http.HttpMethod getMethod(HttpMethod httpMethod){
        switch (httpMethod){
            case GET:
                return io.netty.handler.codec.http.HttpMethod.GET;
            case HEAD:
                return io.netty.handler.codec.http.HttpMethod.HEAD;
            case POST:
                return io.netty.handler.codec.http.HttpMethod.POST;
            case PUT:
                return io.netty.handler.codec.http.HttpMethod.PUT;
            case PATCH:
                return io.netty.handler.codec.http.HttpMethod.PATCH;
            case DELETE:
                return io.netty.handler.codec.http.HttpMethod.DELETE;
            case TRACE:
                return io.netty.handler.codec.http.HttpMethod.TRACE;
            case CONNECT:
                return io.netty.handler.codec.http.HttpMethod.CONNECT;
            default:
                return io.netty.handler.codec.http.HttpMethod.GET;
        }
    }

}
